package org.example.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * @FileName PublishContentDto
 * @Description
 * @Author coderfun
 * @selfDesc coding in fun
 * @date 2024-11-27
 **/
public class PublishContentDto {

    /**
     * 创作者id,是特殊的用户id
     */
    private Long creatorId;
    /**
     * 线上问题的长文本uri，序列化为Json格式
     */
    private String onlineTextUri;
    /**
     * 线上内容的可见范围:私密，好友可见，粉丝可见，所有人可见
     */
    private Long visibility;
    /**
     * 内容的状态:待审核，正常显示，被删除，被下架
     */
    private Long status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public PublishContentDto(Long creatorId, String onlineTextUri, Long visibility, Long status, Date createTime) {
        this.creatorId = creatorId;
        this.onlineTextUri = onlineTextUri;
        this.visibility = visibility;
        this.status = status;
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public Long getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Long creatorId) {
        this.creatorId = creatorId;
    }

    public String getOnlineTextUri() {
        return onlineTextUri;
    }

    public void setOnlineTextUri(String onlineTextUri) {
        this.onlineTextUri = onlineTextUri;
    }

    public Long getVisibility() {
        return visibility;
    }

    public void setVisibility(Long visibility) {
        this.visibility = visibility;
    }

    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "PublishContentDto{" +
                "creatorId=" + creatorId +
                ", onlineTextUri='" + onlineTextUri + '\'' +
                ", visibility=" + visibility +
                ", status=" + status +
                '}';
    }
}
